let a = 100;
let name = "jack"

function open() {
    console.log("open")
}

// module.exports = {
//     a,
//     name,
//     open
// }

// es6 模块化
//默认导出
export default {
    a,
    name,
    open
}
// 默认导入
// import hoo from './hoo.js'


//按需导入导出
export let a = 100
export let name = 'jack'
export function open() {

}

// as 别名
// import {a as a1 ,name, open} from './hoo.js'

//直接导入，并执行模块中代码
// import './hoo.js'